using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._AnalysisTools._Extract
{
    /// <summary>
    /// <para>Split By Attributes</para>
    /// <para>Splits an input dataset by unique attributes.</para>
    /// <para>按唯一属性拆分输入数据集。</para>
    /// </summary>    
    [DisplayName("Split By Attributes")]
    public class SplitByAttributes : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SplitByAttributes()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Table">
        /// <para>Input Table</para>
        /// <para>The input feature class or table whose data will be split into the target workspace.</para>
        /// <para>输入要素类或表，其数据将分割到目标工作空间中。</para>
        /// </param>
        /// <param name="_Target_Workspace">
        /// <para>Target Workspace</para>
        /// <para>The existing workspace where the output feature classes or tables are written.</para>
        /// <para>写入输出要素类或表的现有工作空间。</para>
        /// </param>
        /// <param name="_Split_Fields">
        /// <para>Split Fields</para>
        /// <para>The fields on which the input will be split into new feature classes or tables.</para>
        /// <para>将输入拆分为新要素类或表的字段。</para>
        /// </param>
        public SplitByAttributes(object _Input_Table, object _Target_Workspace, List<object> _Split_Fields)
        {
            this._Input_Table = _Input_Table;
            this._Target_Workspace = _Target_Workspace;
            this._Split_Fields = _Split_Fields;
        }
        public override string ToolboxName => "Analysis Tools";

        public override string ToolName => "Split By Attributes";

        public override string CallName => "analysis.SplitByAttributes";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "configKeyword", "extent", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_Input_Table, _Target_Workspace, _Split_Fields, _Target_Workspace2];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The input feature class or table whose data will be split into the target workspace.</para>
        /// <para>输入要素类或表，其数据将分割到目标工作空间中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Table { get; set; }


        /// <summary>
        /// <para>Target Workspace</para>
        /// <para>The existing workspace where the output feature classes or tables are written.</para>
        /// <para>写入输出要素类或表的现有工作空间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Target_Workspace { get; set; }


        /// <summary>
        /// <para>Split Fields</para>
        /// <para>The fields on which the input will be split into new feature classes or tables.</para>
        /// <para>将输入拆分为新要素类或表的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Split Fields")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _Split_Fields { get; set; }


        /// <summary>
        /// <para>Update Target Workspace</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Target Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _Target_Workspace2 { get; set; }


        public SplitByAttributes SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object configKeyword = null, object extent = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, configKeyword: configKeyword, extent: extent, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}